package com.jinmdz.fmis.api.model.config;

import com.jinmdz.fmis.core.base.BaseBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * config-data.properties 配置信息
 *
 * @author LiCongLu
 * @date 2019-12-31 11:37
 */
@Component("configData")
@PropertySource(value = {"classpath:config-data.properties"}, encoding = "utf-8")
public class ConfigData extends BaseBean {
    /**
     * 是否开始单终端登录验证
     */
    @Value("${system.login.single:false}")
    private boolean systemLoginSingle;

    /**
     * 殡葬业务编码前缀，默认为空
     */
    @Value("${funeral.business.code.prefix:''}")
    private String funeralBusinessCodePrefix;
    /**
     * 殡葬业务编码日期格式,默认为yyyyMMdd
     */
    @Value("${funeral.business.code.date.pattern:'yyyyMMdd'}")
    private String funeralBusinessCodeDatePattern;
    /**
     * 殡葬业务编码自增码长度，默认为4
     */
    @Value("${funeral.business.code.auto.length:4}")
    private int funeralBusinessCodeAutoLength;
    /**
     * 接运信息前缀，默认为空
     */
    @Value("${rec.business.code.prefix:''}")
    private String recBusinessCodePrefix;
    /**
     * 接运信息日期格式,默认为yyyyMMdd
     */
    @Value("${rec.business.code.date.pattern:'yyyyMMdd'}")
    private String recBusinessCodeDatePattern;
    /**
     * 殡葬业务编码自增码长度，默认为4
     */
    @Value("${rec.business.code.auto.length:4}")
    private int recBusinessCodeAutoLength;

    /**
     * 费用结算批次编号前缀，默认为CS
     */
    @Value("${charge.settle.batch.no.prefix:'CS'}")
    private String settleBatchNoPrefix;
    /**
     * 费用结算批次编号日期格式,默认为yyyyMMdd
     */
    @Value("${charge.settle.batch.no.date.pattern:'yyyyMMdd'}")
    private String settleBatchNoDatePattern;
    /**
     * 费用结算批次编号自增码长度，默认为4
     */
    @Value("${charge.settle.batch.no.auto.length:4}")
    private int settleBatchNoAutoLength;

    /**
     * 日结审核批次编号前缀，默认为CV
     */
    @Value("${charge.verify.batch.no.prefix:'CV'}")
    private String verifyBatchNoPrefix;
    /**
     * 日结审核批次编号日期格式,默认为yyyyMMdd
     */
    @Value("${charge.verify.batch.no.date.pattern:'yyyyMMdd'}")
    private String verifyBatchNoDatePattern;
    /**
     * 日结审核批次编号自增码长度，默认为4
     */
    @Value("${charge.verify.batch.no.auto.length:4}")
    private int verifyBatchNoAutoLength;

    /**
     * 查询分页默认大小
     */
    @Value("${query.page_size:20}")
    private int queryPageSize;

    /**
     * 殡仪馆数据总览到馆逝者天数
     */
    @Value("${business.overview.arrived.days:30}")
    private int businessOverviewArrivedDays;

    public boolean isSystemLoginSingle() {
        return systemLoginSingle;
    }

    public ConfigData setSystemLoginSingle(boolean systemLoginSingle) {
        this.systemLoginSingle = systemLoginSingle;
        return this;
    }

    public String getFuneralBusinessCodePrefix() {
        return funeralBusinessCodePrefix;
    }

    public ConfigData setFuneralBusinessCodePrefix(String funeralBusinessCodePrefix) {
        this.funeralBusinessCodePrefix = funeralBusinessCodePrefix;
        return this;
    }

    public String getFuneralBusinessCodeDatePattern() {
        return funeralBusinessCodeDatePattern;
    }

    public ConfigData setFuneralBusinessCodeDatePattern(String funeralBusinessCodeDatePattern) {
        this.funeralBusinessCodeDatePattern = funeralBusinessCodeDatePattern;
        return this;
    }

    public int getFuneralBusinessCodeAutoLength() {
        return funeralBusinessCodeAutoLength;
    }

    public ConfigData setFuneralBusinessCodeAutoLength(int funeralBusinessCodeAutoLength) {
        this.funeralBusinessCodeAutoLength = funeralBusinessCodeAutoLength;
        return this;
    }

    public String getSettleBatchNoPrefix() {
        return settleBatchNoPrefix;
    }

    public ConfigData setSettleBatchNoPrefix(String settleBatchNoPrefix) {
        this.settleBatchNoPrefix = settleBatchNoPrefix;
        return this;
    }

    public String getSettleBatchNoDatePattern() {
        return settleBatchNoDatePattern;
    }

    public ConfigData setSettleBatchNoDatePattern(String settleBatchNoDatePattern) {
        this.settleBatchNoDatePattern = settleBatchNoDatePattern;
        return this;
    }

    public int getSettleBatchNoAutoLength() {
        return settleBatchNoAutoLength;
    }

    public ConfigData setSettleBatchNoAutoLength(int settleBatchNoAutoLength) {
        this.settleBatchNoAutoLength = settleBatchNoAutoLength;
        return this;
    }

    public String getVerifyBatchNoPrefix() {
        return verifyBatchNoPrefix;
    }

    public ConfigData setVerifyBatchNoPrefix(String verifyBatchNoPrefix) {
        this.verifyBatchNoPrefix = verifyBatchNoPrefix;
        return this;
    }

    public String getVerifyBatchNoDatePattern() {
        return verifyBatchNoDatePattern;
    }

    public ConfigData setVerifyBatchNoDatePattern(String verifyBatchNoDatePattern) {
        this.verifyBatchNoDatePattern = verifyBatchNoDatePattern;
        return this;
    }

    public int getVerifyBatchNoAutoLength() {
        return verifyBatchNoAutoLength;
    }

    public ConfigData setVerifyBatchNoAutoLength(int verifyBatchNoAutoLength) {
        this.verifyBatchNoAutoLength = verifyBatchNoAutoLength;
        return this;
    }

    public int getQueryPageSize() {
        return queryPageSize;
    }

    public ConfigData setQueryPageSize(int queryPageSize) {
        this.queryPageSize = queryPageSize;
        return this;
    }

    public int getBusinessOverviewArrivedDays() {
        return businessOverviewArrivedDays;
    }

    public ConfigData setBusinessOverviewArrivedDays(int businessOverviewArrivedDays) {
        this.businessOverviewArrivedDays = businessOverviewArrivedDays;
        return this;
    }

    public String getRecBusinessCodePrefix() {
        return recBusinessCodePrefix;
    }

    public ConfigData setRecBusinessCodePrefix(String recBusinessCodePrefix) {
        this.recBusinessCodePrefix = recBusinessCodePrefix;
        return this;
    }

    public String getRecBusinessCodeDatePattern() {
        return recBusinessCodeDatePattern;
    }

    public ConfigData setRecBusinessCodeDatePattern(String recBusinessCodeDatePattern) {
        this.recBusinessCodeDatePattern = recBusinessCodeDatePattern;
        return this;
    }

    public int getRecBusinessCodeAutoLength() {
        return recBusinessCodeAutoLength;
    }

    public ConfigData setRecBusinessCodeAutoLength(int recBusinessCodeAutoLength) {
        this.recBusinessCodeAutoLength = recBusinessCodeAutoLength;
        return this;
    }
}
